#pragma once

#include <AVUIAnimatable.h>

namespace AVUI {

class GeometryBuilder;

class PathSegment : public Animatable
{
    friend class PathFigure;

public:
    DECLARE_ELEMENT(PathSegment, Animatable);

    DECLARE_DEPENDENCY_PROPERTY(IsStroked);
    bool get_IsStroked() { return AVUI::UnboxValue<bool>(GetValue(get_IsStrokedProperty())); }
    void set_IsStroked(bool value) { SetValue(get_IsStrokedProperty(), AVUI::BoxValue(value)); } 

    DECLARE_DEPENDENCY_PROPERTY(IsSmoothJoin);
    bool get_IsSmoothJoin() { return AVUI::UnboxValue<bool>(GetValue(get_IsSmoothJoinProperty())); }
    void set_IsSmoothJoin(bool value) { SetValue(get_IsSmoothJoinProperty(), AVUI::BoxValue(value)); } 

    virtual bool IsCurved() = 0;
    virtual bool IsEmpty() { return false; }
    virtual Rect GetBounds(Point* pStartPoint) = 0;
    virtual int ClassifyPoint(const Point& pointClassify, Point* pStartPoint) = 0;

private:
    static void StaticConstructor();

    virtual Point BuildGeometry(GeometryBuilder* pGB, const Point& startPoint) = 0;
};



}; // namespace AVUI
